﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="cungcau_ntv_chuyennganh.ascx.cs" Inherits="web_Controls_cungcau_ntv_chuyennganh" %>


    <table style="font-family:tahoma" style="width:100%;">
        <%
            if (dtt_main.Rows.Count > 0)
        {
            for (int i = 0; i < dtt_main.Rows.Count; i++)
            {
         %>
         <tr> 
	        <td colspan="5" align="center">
	            <a href="#" style="color:Blue;font-weight:bold;">
	                <%=dtt_main.Rows[i][1].ToString()%> 
	            </a>
	        </td> 
        </tr> 
        <tr align="center" valign="middle" style="background:#e0ad8f;color:#FFFFFF;font-weight:bold;"> 
	        <td width="5%">STT</td><td width="35%">Tiêu đề HS</td><td width="12%">Ngày sinh</td>			
	        <td width="8%">Giới tính</td><td width="40%">Địa chỉ</td>	
        </tr>
        <%
            //Liệt kê tất cả các tuyển dụng của nhà tuyển dụng này, nếu đc kích hoạt
            sql_sub = "select A.*,B.ma_ho_so as ma_ho_so,B.tieu_de,dbo.fcGetDiaChiChiTiet(A.dia_chi) AS tt from ConNguoi_nguoi as A inner join NguoiTimViec_ho_so as B ON A.ma_nguoi=B.ma_nguoi" +
                " inner join ConNguoi_hoc_van_chuyen_mon as C on A.ma_nguoi=C.ma_nguoi"+
                " where C.ma_chuyen_mon=" +
                dtt_main.Rows[i][0].ToString() + " and B.kich_hoat=1 and A.kich_hoat=1";
            dtt_sub = comm.getDataTable(sql_sub);
            if (!string.IsNullOrEmpty(dtt_sub.Rows.Count.ToString()) && dtt_sub.Rows.Count > 0)
            {
                for (int j = 0; j < dtt_sub.Rows.Count; j++)
                {
        %>
        <tr class="list_sub_detail" style="height:30px;background:#c7dbf8"> 
	        <td ><%=j + 1%></td> 
	        <td align="left"><a target="_blank" href="../../Default.aspx?page=ntv_chitiet&id=<%=dtt_sub.Rows[j]["ma_ho_so"].ToString()%>"><%=dtt_sub.Rows[j]["tieu_de"]%></a></td> 
	        <td align="left"><%=DateTime.Parse(dtt_sub.Rows[j]["ngay_sinh"].ToString()).ToString("dd/MM/yyyy")%></td> 
	        <td class="Normal" align="left" ><%=(Boolean.Parse(dtt_sub.Rows[j]["gioi_tinh"].ToString())?"Nam":"Nữ")%></td> 
	        <td class="Normal" align="left" ><%=dtt_sub.Rows[j]["dia_chi_chi_tiet"]+"-"+dtt_sub.Rows[j]["tt"]%></td> 
        </tr>
        <% }
                }
            }
            }%>
    </table>